package cn.com.dragonsoftbravo.utils;

import java.util.Properties;

import org.springframework.mail.MailSender;
import org.springframework.mail.javamail.JavaMailSenderImpl;

public class MailSenderImpl extends BaseMailSender {
	protected MailSender getMailSender() {
		JavaMailSenderImpl sender = new JavaMailSenderImpl();

		sender.setHost(stmpServer);
		sender.setUsername(userName);
		sender.setPassword(password);
		Properties props = new Properties();
		props.put("mail.smtp.auth", "true");
		props.put("mail.smtp.host", stmpServer);
		sender.setJavaMailProperties(props);

		return sender;
	}
}
